class UrlMappings {

	static mappings = {
		"/$controller/$action?/$id?"{
			constraints {
				// apply constraints here
			}
		}
			
		//REST INTERFACE FOR EVENTS
		"/rest/event/$id"(controller: "rest",  parseRequest: true) {
			action = [GET: "showEvent", PUT: "updateEvent", DELETE: "deleteEvent", POST: "saveEvent"]
		}
		//REST INTERFACE FOR EVENTS
		"/rest/events"(controller: "rest",  parseRequest: true) {
			action = [GET: "listEvents"]
		}
		
		//REST INTERFACE FOR USER PROFILES
		"/rest/profiles"(controller: "rest",  parseRequest: true) {
			action = [GET: "listProfiles"]
		}
		"/rest/profile/$id"(controller: "rest",  parseRequest: true) {
			action = [GET: "showProfile", PUT: "updateProfile", DELETE: "deleteProfile", POST: "saveProfile"]
		}
			
		"/rest/profile/register"(controller: "rest",  parseRequest: true) {
			action = [POST: "registerProfile"]	
		}
		
		"/rest/event/accept"(controller: "rest",  parseRequest: true) {
			action = [POST: "acceptEvent"]	
		}
		
		"/"(view:"/index")
		"500"(view:'/error')
	}
}
